Waverider Systems
http://www.WaveriderSystems.com
Perlshop 4 Order Collator CSV Plugin
Version 1.3
--------------------------------------------------------------------------------------
Overview:
This plugin collects customer and order information as it is generated, and appends
it to common customer and order CSV files. These two files can then be uploaded or
imported into databases, spreadsheets, or bulk email programs.
--------------------------------------------------------------------------------------
This plugin requires Perlshop 4.3.00 or later.
Installation Procedure:
1. Place the ps_plugin_collator_csv.pl file into the same web server directory as your perlshop.cgi file.
2. Give the ps_plugin_collator_csv.pl file the same file permissions as your perlshop.cgi file.
3. Add the CSV Order Collator plugin to the plugin registration table in your ps.cfg file.
Example plugin registration table before adding the CSV Order Collator plugin:
# Plugin modules. See the external documentation for details.
%plugins =
(
# Calendar example plugin
'calendar' =>
{
'program' => 'ps_plugin_gencal.pl'
}
);
Example plugin registration table after adding the CSV Order Collator plugin:
# Plugin modules. See the external documentation for details.
%plugins =
(
# Calendar example plugin
'calendar' =>
{
'program' => 'ps_plugin_gencal.pl'
},
# CSV Order Collator plugin
'collator_csv' =>
{
'module' => 'PS_Collator_CSV.pm',
'event' => 'after_place_order',
'display' => 'no',
'period' => 'month',
'subdirectory' => 'collator_data'
}
);
--------------------------------------------------------------------------------------
Optional ps.cfg CSV Order Collator plugin configuration settings:
'period'
This value is optional, and has four possible settings. Possible values are 'day', 'month', 'quarter', and 'year'. See below for details.
'subdirectory'
This value is optional, and is used to specify the subdirectory that will be used to hold the customer and order data tracking files. If this option is left out, the customer and order data tracking files will be stored in same directory as the perlshop.cgi file.
--------------------------------------------------------------------------------------
Using the CSV Order Collator plugin
Once added to the ps.cfg file, this plugin will automatically be used by Perlshop 4.
This plugin will create and maintain two new files, both located in the same directory as the plugin itself.
The first of these files is the customer data file. This is a text file in CSV format, with the first line of the file being the names of the fields in each subsequent row. As each new 'customers' file is created by Perlshop, this plugin will append the data from that file to the end of the collator customer data file.
The second file created by this plugin is the order data file. This is a text file in CSV format, with the first line of the file being the names of the fields in each subsequent row. As each new 'orders' file is created by Perlshop, this plugin will append the data from that file to the end of the collator order data file.
These files may be uploaded to your desk top at any time via FTP. They may also be imported directly into a database, spreadsheet, or bulk email program - please see the documentation for your software for details.
--------------------------------------------------------------------------------------
Collator CSV File Names
By default, the collator CSV customer file will be named 'customers.csv', and the collator CSV order file will be named 'orders.csv'.
If the plugin 'period' parameter is set to 'year', the default collator CSV file names will have the current year added to them. Example: 'customers_2000.csv'
If the plugin 'period' parameter is set to 'quarter', the default collator CSV file names will have the current year and business quarter added to them. Example: 'customers_2001_q1.csv'
If the plugin 'period' parameter is set to 'month', the default collator CSV file names will have the current year and month added to them. Example: 'orders_2001_01.csv'
If the plugin 'period' parameter is set to 'day', the default collator CSV file names will have the current year, month, and day added to them. Example: 'customers_2001_01_27.csv'